@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        广告管理
        <small>广告位置列表</small>
        <small>添加</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li >广告管理</li>
        <li ><a href="/admin/ad_position">广告位置列表</a></li>
        <li class="active">添加</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            {!! Form::model($adpos,['route'=>['admin.ad_position.store'],'class'=>'form-horizontal'])  !!}
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">广告位置添加</h3>
                    <div class="pull-right">
                        <a href="{{Route('admin.ad_position.index')}}" type="button" class="btn btn-block btn-success btn-xs"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->

                {!! Form::hidden('back_url',@$_SERVER['HTTP_REFERER']) !!}
                <div class="box-body">

                    <div class="form-group @if($errors->has('position_name')) has-error   @endif">
                        <label class="col-sm-2 control-label" for="exampleInputEmail1">位置名称</label>
                        <div class="col-sm-2">
                            {!! Form::text('position_name',old('position_name'),array('class'=>'form-control','placeholder'=>'广告位置名称'))!!}
                        </div>
                        <div class="col-sm-2">
                            @if($errors->has('position_name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('position_name')}}</label>
                            @endif
                        </div>
                    </div>


                    <div  class="form-group @if($errors->has('position_key')) has-error   @endif">
                        <label class="col-sm-2 control-label" for="exampleInputEmail1">位置标识</label>
                        <div class="col-sm-3">
                            {!! Form::text('position_key',old('position_key'),array('class'=>'form-control','placeholder'=>'广告位置标识'))!!}
                        </div>
                        <div class="col-sm-3">
                            @if($errors->has('position_key'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('position_key')}}</label>
                            @endif
                        </div>
                    </div>

                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <div class="form-group no-padding">
                        <label class="col-sm-2 control-label">&nbsp;</label>
                        <div class="col-sm-3">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.box -->
        {!! Form::close()  !!}

    </div>



</section>
<!-- /.content -->
@endsection